package com.bit.ioc.controller;


import com.bit.ioc.model.Dbtypes;
import com.bit.ioc.model.Person;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-11-22
 * Time: 10:10
 */


@RestController
public class YmlController {
    @Value("${String.hello}")
    private String hello;
    @Value("${Person.name}")
    private String name;

    @Autowired
    private Person person;

    @Autowired
    private Dbtypes dbtypes;

    @Autowired

//    @Value("${dbtypes.ball")
//    private Map<String, String> ball;



    @PostConstruct
    public void key(){
        System.out.println("获取的值：" + name);
        System.out.println("获取到的值：" + hello);
        System.out.println("获取到的对象：" + person);
        System.out.println("获取到的对象：" + dbtypes);


    }


}
